<%@page import="org.swim.web.utils.FormHelper"%>
<%@page import="org.swim.web.utils.SwimConst"%>
<%@page import="org.swim.remote.entities.ICollaboration"%>
<%@page import="org.swim.web.utils.SwimUtils"%>
<%@page import="org.swim.web.servlet.consts.*"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<!--Start New Collaboration -->
<div id="newCollaboration" class="modal hide fade" tabindex="-1"
	role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<form method="post"
		action="<%=SwimConst.Url.Servlet.COLLABORATION%>?a=<%=Action.NEWCOLLABORATION.name().toLowerCase()%>">
		<div class="modal-header">
			<button type="button" class="close" data-dismiss="modal"
				aria-hidden="true">×</button>
			<h4 id="myModalLabel">
				Collaborate with <span id="userFullname"></span>
			</h4>
		</div>
		<div class="modal-body">
			<div class="span" style="display: block">
				<img src="<%=SwimConst.Url.WEBCONTENT%>/img/default/user256.png"
					width="126" class="img-polaroid" style="background: #FFF">
			</div>
			<div class="span">
				<%=FormHelper.getHiddenInput("userId", "")%>
				<div class="controls controls-row">
					<input name="title" class="span4" type="text"
						placeholder="Collaboration title" required>
				</div>
				<%
					if (!SwimUtils.isLogged(request)) {
				%>
				<div class="controls controls-row">
					<input name="email" class="span4" type="text"
						placeholder="Your email" required>
				</div>
				<%
					} else {
				%>
				<div class="controls controls-row">
					<label class="span inline"> <input type="radio"
						name="senderVisibility"
						value="<%=ICollaboration.Visibility.VISIBLE.name()
						.toLowerCase()%>" checked="checked">
						<span class="help-inline" style="margin-top: 3px">Sender visibile</span>
					</label> <label class="span inline"> <input type="radio"
						name="senderVisibility"
						value="<%=ICollaboration.Visibility.HIDDEN.name().toLowerCase()%>">
						<span class="help-inline" style="margin-top: 3px">Sender hidden</span>
					</label>
				</div>
				<%
					}
				%>
				<div class="controls">
					<textarea class="span4" rows="5" name="message"
						placeholder="Type a message..."></textarea>
				</div>

			</div>
		</div>
		<div class="modal-footer">
			<button class="btn" data-dismiss="modal" aria-hidden="true">Cancel</button>
			<button class="btn btn-primary" type="submit">Send message</button>
		</div>
	</form>
</div>
<!-- End New Collaboration -->
